/*
 * @Author: 江舟 jijiangzhou@recycloud.cn
 * @Date: 2024-04-07 18:13:45
 * @LastEditors: 江舟 jijiangzhou@recycloud.cn
 * @LastEditTime: 2024-05-11 16:05:07
 * @FilePath: \vite-project\src\components\common\Page.tsx
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { Icon } from '@iconify/react/dist/iconify.js';

interface PageProps {
	title?: string;
	children?: any;
}
const Page: React.FC<PageProps> = ({ title, children }) => {
	return (
		<div className="bg-white p-[24px]">
			{title && (
				<>
					<div className="text-[18px] font-bold flex items-center">
						<Icon
							width={20}
							icon="ant-design:arrow-left-outlined"
							className="mr-8px cursor-pointer"
							onClick={() => history?.back()}></Icon>
						<span>{title}</span>
					</div>
					<div className="bg-[#eee] h-[1px] mt-[12px] mb-[24px]"></div>
				</>
			)}
			{children}
		</div>
	);
};

export default Page;
